package cn.edu.scau.cmi.zhuangxipan.chapter6;

abstract class A2{
	abstract int sum(int x,int y);
	int sub(int x,int y) {
		return x-y;
	}
}
class B1 extends A2{
	int sum(int x,int y) {
		return x+y;
	}
}
public class Example6_9 {
	public static void main(String args[]) {
		B1 b=new B1();
		int sum=b.sum(30, 20);
		int sub=b.sub(30, 20);
		System.out.println("sum="+sum);
		System.out.println("sum="+sub);
	}

}
